package com.campus.merchant.bean.merchant;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 商户营业时间保存Bean
 */
@Data
@ApiModel("商户营业时间保存Bean")
public class MerchantBusinessHoursSaveBean {
    @ApiModelProperty(value = "商户ID", required = true)
    @NotNull(message = "商户ID不能为空")
    private Integer merchantId;

    @ApiModelProperty(value = "营业时间列表", required = true)
    @NotNull(message = "营业时间列表不能为空")
    private List<BusinessHourItem> businessHoursList;

    @Data
    @ApiModel("营业时间项")
    public static class BusinessHourItem {
        @ApiModelProperty(value = "开始时间(如09:00)", required = true)
        @NotNull(message = "开始时间不能为空")
        private String startTime;

        @ApiModelProperty(value = "结束时间(如21:00)", required = true)
        @NotNull(message = "结束时间不能为空")
        private String endTime;

        @ApiModelProperty(value = "每周营业日，7位字符串，1-营业，0-休息(如1111100表示周一到周五营业)", required = true)
        @NotNull(message = "营业日不能为空")
        private String weekdays;
    }
}